package com.interview.javabasic.tests;/*
@李子宁
Happy,happy everyday!
冲鸭！
*/

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入一个整数（不能为负数): ");
        String ss = in.nextLine();
        int a = Integer.parseInt(ss);
        if (a < 0){
            System.out.println("该数字为负值！");
        }else{
            StringBuilder s = new StringBuilder(ss);
            s.reverse();
            System.out.println(s);
        }
    }
}

